//
//  WCBuildMessage.h
//  WabbitCode
//
//  Created by William Towe on 2/8/09.
//  Copyright 2009 Revolution Software. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "WCTreeNode.h"


typedef enum _WCBMType {
	WCBMTypeError,
	WCBMTypeWarning,
	WCBMTypeFile,
	WCBMTypeFileExpanded,
	WCBMTypeBuild,
	WCBMTypeFailureErrors,
	WCBMTypeSuccessWarnings,
	WCBMTypeBuildSuccess
	
} WCBMType;

@class WCTextFile;

@interface WCBuildMessage : WCTreeNode <NSCoding, NSCopying, NSMutableCopying> {
	NSString *_messageText;
	WCBMType _messageType;
	WCTextFile *_textFile;
	NSUInteger _lineNumber;
}
@property (readonly) NSString *messageText;
@property (readwrite, assign) WCBMType messageType;
@property (readonly) NSImage *icon;
@property (readonly) WCTextFile *textFile;
@property (readonly) NSUInteger lineNumber;
@property (readonly) BOOL usesCustomAttributes;
@property (readonly) NSUInteger numberOfErrors;
@property (readonly) NSUInteger numberOfWarnings;
@property (readonly) NSUInteger numberOfErrorsAndWarnings;
@property (readonly) NSNumber *lineNumberAsObject;

+ (id)buildMessageWithType:(WCBMType)type text:(NSString *)text textFile:(WCTextFile *)textFile lineNumber:(NSUInteger)lineNumber;

- (id)initWithType:(WCBMType)type text:(NSString *)text textFile:(WCTextFile *)textFile lineNumber:(NSUInteger)lineNumber;
@end
